<extend name="Public:common"/>
<block name="main">
    <div data-am-widget="tabs" class="am-tabs am-tabs-secondary" >
        <ul class="am-tabs-nav am-cf">
            <if condition="$type eq 1">
                <li class=""><a href="[data-tab-panel-2]">支出</a></li>
                <li class="am-active"><a href="[data-tab-panel-1]">收入</a></li>
            <else/>
                <li class="am-active"><a href="[data-tab-panel-2]">支出</a></li>
                <li class=""><a href="[data-tab-panel-1]">收入</a></li>
            </if>
        </ul>
        <div class="am-tabs-bd">
            <if condition="$type eq 1">
                <div data-tab-panel-2 class="am-tab-panel">
            <else/>
                <div data-tab-panel-2 class="am-tab-panel am-active">
            </if>
                <form class="am-form am-form-horizontal" method="post" data-am-validator="H5validation:false">
                    <legend>添加支出</legend>
                    <input type="hidden" name="add_type" value="2">
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>金额</b></span>
                        <input type="number" class="am-form-field" id="text-money" name="add_money" step=0.01 placeholder="输入支出金额">
                        <p></p>
                    </div>
                    <div><p></p></div>
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>分类</b></span>
                        <select id="select-class" class="am-form-field" name="add_class">
                        <foreach name="outMoneyClass" item="ClassName">
                            <option value="{$key}">{$ClassName}</option>
                        </foreach>
                        </select>
                        <span class="am-form-caret"></span>
                    </div>
                    <div><p></p></div>
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>备注</b></span>
                        <input type="text" class="am-form-field" id="text-mark" name="add_mark" placeholder="输入支出信息">
                    </div>
                    <div><p></p></div>
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>时间</b></span>
                        <input type="date" class="am-form-field" id="text-time" name="add_time" 
                                value="<php>echo date("Y-m-d",time());</php>" />
                    </div>
                    <p><hr data-am-widget="divider" style="" class="am-divider am-divider-dashed" /></p>
                    
                    <p><button type="submit" name="submit" class="am-btn am-btn-warning am-btn-block">添加</button></p>
                    <p><a href="{$refURL}" class="am-btn am-btn-block am-btn-default">返回</a></p>
                </form>
            </div>
            <if condition="$type eq 1">
                <div data-tab-panel-1 class="am-tab-panel am-active">
            <else/>
                <div data-tab-panel-1 class="am-tab-panel ">
            </if>
            
                <form class="am-form am-form-horizontal" method="post" data-am-validator="H5validation:false">
                    <legend>添加收入</legend>
                    <input type="hidden" name="add_type" value="1">
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>金额</b></span>
                        <input type="number" class="am-form-field" id="text-money" name="add_money" step=0.01 placeholder="输入收入金额">
                        <p></p>
                    </div>
                    <div><p></p></div>
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>分类</b></span>
                        <select id="select-class" class="am-form-field" name="add_class">
                        <foreach name="inMoneyClass" item="ClassName">
                            <option value="{$key}">{$ClassName}</option>
                        </foreach>
                        </select>
                        <span class="am-form-caret"></span>
                    </div>
                    <div><p></p></div>
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>备注</b></span>
                        <input type="text" class="am-form-field" id="text-mark" name="add_mark" placeholder="输入收入信息">
                    </div>
                    <div><p></p></div>
                    <div class="am-input-group">
                        <span class="am-input-group-label"><b>时间</b></span>
                        <input type="date" class="am-form-field" id="text-time" name="add_time" 
                                value="<php>echo date("Y-m-d",time());</php>" />
                    </div>
                    <p><hr data-am-widget="divider" style="" class="am-divider am-divider-dashed" /></p>
                    
                    <p><button type="submit" name="submit" class="am-btn am-btn-success am-btn-block">添加</button></p>
                    <p><a href="{$refURL}" class="am-btn am-btn-block am-btn-default">返回</a></p>
                </form>
            </div>
        </div>
    </div>
    <include file="Public:list_common"/>
    <gt name="PageMax" value="1">
        <a href="__APP__/Home/Index/index/p/2" class="am-btn am-btn-block am-btn-default">更多</a>
    </gt>
</block>